	var hkWebsocket = null;
	isWebsocket = function() {
		if (window.WebSocket && (typeof WebSocket != 'undefined')) {
			return true;
		}
		return false;
	}

	initWebsocketMon = function() {
		if (isWebsocket()) {
			hkWebsocket = new WebSocket(webSocketAddrNew);
		} else {
			alert("您的浏览器不支持websocket!");
		}
		hkWebsocket.onerror = function() {
			vm.$message.error('连接错误!');
		}
		hkWebsocket.onmessage = function(e) {
           if (e.data && e.data !== 'ok'){
           	  var res = JSON.parse(e.data);
           	  console.log('new',res);
           	  res.data.forEach((el,index)=>{
           	  	 if(el.message=="1"){
           	  	 	$(".vioceInvade")[0].play();
           	  	 }
           	  	 if(el.message=="2"){
           	  	 	$(".vioceHigh")[0].play();
           	  	 	
           	  	 }
           	  })
           }
		}
		hkWebsocket.onclose = function() {
			console.log('连接已断开');
		}
	}